import { BasicColumn } from '/@/components/Table'

export const Columns: BasicColumn[] = [
    {
        title: '标题',
        dataIndex: 'title',
    },
    {
        title: '内容',
        dataIndex: 'content',
    },
    {
        title: '类型',
        dataIndex: 'type',
        slots: { customRender: 'type' },
    },
    {
        title: '图片',
        dataIndex: 'image',
        slots: { customRender: 'image' },
    },
    {
        title: '发布时间',
        dataIndex: 'createdAt',
    },
]

export const FormConfig: any = {
    labelWidth: 100,
    schemas: [
        {
            field: 'type',
            label: '通知类型:',
            component: 'Select',
            componentProps: {
                options: [
                    {
                        label: '系统通知',
                        value: 1,
                    },
                    {
                        label: '用户通知',
                        value: 2,
                    },
                ],
            },
            colProps: {
                xl: 8,
                xxl: 6,
            },
        },
        {
            field: 'title',
            label: '标题:',
            component: 'Input',
            componentProps: {
                placeholder: '请输入标题',
            },
            colProps: {
                xl: 8,
                xxl: 6,
            },
        },
    ],
}
